<?php

$method_map = array(
"" => "index",
"up" => "up",
"down" => "down"
);

include("baseController.php");
require_once("helpers/url_helper.php");
require_once("data/migrate.php");

function index() {
	showView('migration',array());
}

function up() {
	global $max_version;
	migrate($max_version);
	header('Location: '.get_url('migrate',null,array()));
}

function down() {
	global $max_version;
	demigrate($max_version);
	header('Location: '.get_url('migrate',null,array()));
}
